The present invention relates to a control method in a programmable controller and, more specifically, to an improvement of a processing speed of a programmable controller.
FIG. 5 is a flowchart showing a process performed while a conventional programmable controller (hereinafter abbreviated to "PC") is running. As shown, a sequence control process is repeatedly performed which consists of I/O transfer (S1) and execution of a PC program (S2).
FIG. 6 is a flowchart showing details of the I/O transfer process, in which input state information is received from an input circuit board connected to the PC and execution results of a PC program is sent to an output circuit board. In step S10, information on one circuit board is picked up from among I/O map information (i.e., information on circuit boards connected to the PC) stored in a memory device of the PC. Then, it is judged in step S11 whether no circuit board remains to be processed. If a circuit board (or boards) remains, the kind of the above-picked-up circuit board is analyzed in step S12, and it is judged in step S13 whether the circuit board is an input circuit board or not. If the judgment is affirmative, in step S14 input processing is performed to receive input state information from the input circuit board. On the other hand, if the judgment is negative, i.e., if the circuit board is an output circuit board, in step S15 output processing is performed to provide execution results of a PC program to the picked-up output circuit board. After completion of the input processing or output processing, in step S16 post-processing is performed to renew a read address of the I/O map information, and the process returns to step S10. In this manner, the input processing or output processing is performed for all the circuit boards based on the judgment on the kind of the respective circuit boards, that is, until the judgment of step S11 turns affirmative.
FIG. 7 is a flowchart showing details of the PC program execution process, in which a user-made, sequence control user program is executed. Preparatory processing such as initial setting is first performed in step S20. Then, one instruction of the PC program is read from the memory device in step S21, and analyzed in step S22. Then, it is judged in step S23 whether the instruction is an end instruction. If the judgment is negative, a preparation for execution of the readout instruction is performed in step S24, and the instruction is actually executed in step S25. Finally, post-processing is performed to renew a read address of the PC program in step S26, and the process returns to step 21. The above process is repeated until it is judged that the end instruction has been read in step S23.
However, if one examines the details of the above I/O transfer process and the PC program execution process performed in conventional PCs, he can find that processes other than those absolutely required in the sequence control, i.e., the I/O process and instruction executing process, are also performed. This will unavoidably necessitate an additional processing time.